package cn.cdeden.resource.domain.bo;

import cn.cdeden.common.core.validate.AddGroup;
import cn.cdeden.common.core.validate.EditGroup;
import cn.cdeden.resource.domain.SysOssSlice;
import cn.cdeden.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 文件分片上传列处理业务对象 sys_oss_slice
 *
 * @author Yu.
 * @date 2024-12-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysOssSlice.class, reverseConvertGenerate = false)
public class SysOssSliceBo extends BaseEntity {

    /**
     * 对象存储主键
     */
    @NotNull(message = "对象存储主键不能为空", groups = { EditGroup.class })
    private Long sliceId;

    /**
     * 文件名
     */
    @NotBlank(message = "文件名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileName;

    /**
     * 原名
     */
    @NotBlank(message = "原名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String originalName;

    /**
     * 文件后缀名
     */
    @NotBlank(message = "文件后缀名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileSuffix;

    /**
     * 服务商
     */
    @NotBlank(message = "服务商不能为空", groups = { AddGroup.class, EditGroup.class })
    private String service;

    /**
     * 模块编号
     */
    @NotBlank(message = "模块编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String moduleType;

    /**
     * 文件的MD5
     */
    @NotBlank(message = "文件的MD5不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileMd5;

    /**
     * 桶名称
     */
    @NotBlank(message = "桶名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String bucketName;

    /**
     * 文件大小
     */
    @NotNull(message = "文件大小不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long fileSize;

    /**
     * 分片编号
     */
    @NotNull(message = "分片编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long partSize;

    /**
     * 其他的信息
     */
    @NotBlank(message = "其他的信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String info;

    /**
     * 分片状态
     */
    @NotBlank(message = "分片状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String state;

    /**
     * 文件备注
     */
    @NotBlank(message = "文件备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remarks;


}
